<template>
  <div class="editor">
    <div class="editor-block" :style="blockStyle">
      {{ RenderComponent }}
    </div>
  </div>
</template>

<script setup lang="ts">
import { computed, defineProps, inject } from 'vue';
const props = defineProps(['item']);
console.log(props.item);
const config = inject('config');
console.log(config);
const blockStyle = computed(() => {
  top: `${props.item.top}`;
  left: `${props.item.left}`;
  zIndex: `${props.item.zIndex}`;
});
const component = computed(() => {
  return props.item.key;
});
console.log(component.value);

const RenderComponent = component.render();
</script>

<style scoped></style>
